package com.movie.dao;

import com.movie.model.Order;
import com.movie.model.OrderSeat;
import com.movie.util.OrderStatistics;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface OrderMapper {
    void createOrder(Order order);
    void createOrderSeats(List<OrderSeat> seats);
    List<Order> getOrdersByUserId(Integer userId);
    Order getOrderById(Integer orderId);
    void updateOrderStatus(Integer orderId, String status);
    List<OrderSeat> getOrderSeats(Integer orderId);
    List<OrderSeat> getScreeningSeats(Integer screeningId);
    boolean checkSeatAvailability(@Param("screeningId") Integer screeningId,@Param("row") Integer row,@Param("column") Integer column);
    
    // 统计相关方法
    Long getTotalOrderCount();
    Long getPaidOrderCount();
    Long getUnpaidOrderCount();
    BigDecimal getTotalRevenue();
    BigDecimal getTodayRevenue();
    Long getTodayOrderCount();
    Long getTotalUserCount();
    Long getTotalSeatCount();
}